package com.tjw.ec.upms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tjw.ec.common.core.util.PageUtils;
import com.tjw.ec.common.core.util.Query;
import com.tjw.ec.upms.api.entity.PositionUserEntity;
import com.tjw.ec.upms.dao.PositionUserDao;
import com.tjw.ec.upms.service.PositionUserService;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 职位成员表;
 *
 * @author T-junwen
 * @email t-junwen@foxmail.com
 * @date 2019-07-27 16:43:31
 */
@Service("positionUserService")
public class PositionUserServiceImpl extends ServiceImpl<PositionUserDao, PositionUserEntity> implements PositionUserService {

    @Override
    public PageUtils<PositionUserEntity> queryPage(Map<String, Object> params) {

        IPage<PositionUserEntity> page = new Query<PositionUserEntity>(params).getPage();

        QueryWrapper<PositionUserEntity> queryWrapper = new QueryWrapper<>();

        IPage<PositionUserEntity> data = baseMapper.selectPage(
                page,
                queryWrapper
        );

        return new PageUtils(data);
    }

}
